<div class="col6 simpleFlexCol">
  <% if (ob.errors['name']) print(ob.formErrorTmpl({ errors: ob.errors['name'] })) %>
  <input type="text" class="clrBr clrP clrSh2 variantNameInput js-variantNameInput" name="name" value="<%= ob.name %>" placeholder="<%= ob.polyT('editListing.variants.titlePlaceholder') %>" maxlength="<%= ob.max.nameLength %>">
</div>
<div class="col6 simpleFlexCol">
  <%
    let variantsErrs = [];

    Object.keys(ob.errors).forEach(errKey => {
      if (errKey.startsWith('variants[') && errKey.endsWith('].name')) {
        variantsErrs = variantsErrs.concat(ob.errors[errKey]);
      }
    });

    if (ob.errors['variants']) {
      variantsErrs = variantsErrs.concat(ob.errors['variants']);
    }

    if (variantsErrs.length) print(ob.formErrorTmpl({ errors: variantsErrs }));
  %>
  <div class="flexRow marginTopAuto">
    <select multiple name="variants" class="clrBr clrP clrSh2 hideDropDown flexExpand" placeholder="<%= ob.polyT('editListing.variants.choicesPlaceholder') %>"></select>
    <a class="iconBtn clrBr clrP clrSh2 margLSm toolTipNoWrap js-btnRemoveVariant btnRemoveVariant" data-tip="<%= ob.polyT('editListing.variants.toolTip.delete') %>">
      <i class="ion-trash-b"></i>
    </a>
  </div>
</div>
